{include file="public/_meta" /}
<title></title>
</head>

<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>财务管理 <span class="c-gray en">&gt;</span> 提现记录<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px;margin-right:6px " onclick="excel()" title="导出"><i class="Hui-iconfont">&#xe644;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <form class="Huiform" method="get" action="">
            状态：
            <span class="select-box inline">
                <select name="tixian_type" class="select">
                    <option value="">全部</option>
                     <option value="0">待审核</option>
                    <option value="1">已通过</option>
                    <option value="2">已驳回</option>
                </select>
            </span>
            <input type="text" class="input-text" style="width:150px" placeholder="用户姓名、手机号" id="" name="keywords" value="{$Request.get.keywords|default=''}">
            日期范围：
            <input type="text" class="input-text Wdate" name="start" id="countTimestart" onfocus="selecttime(1)" value="{$Request.get.start|default=''}" size="17" class="date" readonly style="width:140px;">
            -
            <input type="text" class="input-text Wdate" name="end" id="countTimeend" onfocus="selecttime(2)" value="{$Request.get.end|default=''}" size="17"  class="date" readonly style="width:140px;">
            <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">提现统计：<strong>{$money}</strong> 元</span>
        <span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
    <div class="mt-20">
        <table class="table table-border  table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th>id</th>
                <th>账户姓名</th>
                <th>手机号</th>
                <th>提现金额</th>

                <th>持卡人姓名</th>
                <th>开户行</th>
                <th>银行卡号</th>
                <th>银行分行</th>

                <th>状态</th>


                <th>申请时间</th>
                <th>审核时间</th>
            </tr>
            </thead>
            <tbody>
            {volist name='list' id="vo"}
            <tr class="text-c">
                <td>{$vo.id}</td>
                <td>{$vo.us_nickname}</td>
                <td>{$vo.us_tel}</td>
                <td>{$vo.money}</td>

                {volist name='$vo.bank' id="v"}
                <td>{$v.card_holder}</td>
                <td>{$v.bank_name}</td>
                <td>{$v.bank_account}</td>
                <td>{$v.bank_branch_name}</td>
                {/volist}

                <td>
                    {if $vo.tx_status ==1}已通过
                    {elseif $vo.tx_status == 2/}已反驳
                    {elseif $vo.tx_status == 0/}待审核
                    {else/}
                    {/if}
                </td>

                <td>{$vo.add_time}</td>
                <td>
                    {if $vo.tx_status == 1}{$vo.tx_adopt_time}
                    {elseif $vo.tx_status == 2 /}{$vo.tx_back_time}
                    {/if}
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="pages" style="margin:20px;float: right; ">{$list|raw}</div>
    </div>
    {include file="public/_footer" /}
    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="/static/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript">
        $('select[name="wa_type"]').val({$Request.get.wa_type});

        function create(id, url, key) {
            var url = "{:url('" + url + "')}?id=" + id;
            creatIframe(url, key);
        }

        function change(id, value, key) {
            layer.confirm('确定要更改么？', {
                btn: ['确定', '取消']
            }, function(index, layero) {
                $.ajax({
                    type: "post",
                    url: "{:url('index')}",
                    data: { id: id, value: value, key: key },
                    success: function(data) {
                        if (data.code) {
                            location.href = '';
                        }
                    }
                });
            });
        }

        function excel(){

            var tixian_type = $('select[name="tixian_type"]').val();
            // var ca_id = $('select[name="ca_id"]').val();
            // var num_min = $('input[name = "num_min"]').val();
            // var num_max = $('input[name = "num_max"]').val();
            var keywords = $('input[name = "keywords"]').val();
            var  start = $('input[name="start"]').val();
            var time_start = Date.parse(start)
            var end = $('input[name="end"]').val();
            var time_send= Date.parse(end)
            var url = "{:url('excel')}?tixian_type="+tixian_type+"&keywords="+keywords+"&time_start="+time_start+"&time_send="+time_send;
            creatIframe(url,'表格导出');
            location.href = '';

            // var url = "{:url('excel')}";
            // creatIframe(url,'表格导出');
            // location.href = '';
        }


        function del(id, key) {
            layer.confirm('确定要删除么？', {
                btn: ['确定', '取消']
            }, function(index, layero) {
                $.ajax({
                    type: "post",
                    url: "{:url('Every/allDel')}",
                    data: { id: id, key, key },
                    success: function(data) {
                        layer.msg(data.msg);
                        if (data.code == 1) {
                            setTimeout(function() {
                                location.href = data.url;
                            }, 1000);
                        }
                    }
                });
            });
        }
        function selecttime(flag){
            if(flag==1){
                var endTime = $("#countTimeend").val();
                if(endTime != ""){
                    WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',maxDate:endTime})}else{
                    WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})}
            }else{
                var startTime = $("#countTimestart").val();
                if(startTime != ""){
                    WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:startTime})}else{
                    WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})}
            }
        }
    </script>
</body>

</html>